class_name PlayerState extends Resource
var gems: Dictionary = {
	Globals.COIN_COLOR.WHITE:0,
	Globals.COIN_COLOR.BLUE:0,
	Globals.COIN_COLOR.RED:0,
	Globals.COIN_COLOR.GREEN:0,
	Globals.COIN_COLOR.BROWN:0,
	Globals.COIN_COLOR.GOLD:0,
}  # 当前持有宝石
var bonuses: Dictionary = {
	Globals.COIN_COLOR.WHITE:0,
	Globals.COIN_COLOR.BLUE:0,
	Globals.COIN_COLOR.RED:0,
	Globals.COIN_COLOR.GREEN:0,
	Globals.COIN_COLOR.BROWN:0,
} # 永久加成
var reserved_cards: Array[CardData] = []
var prestige_points: int = 0
var nobles: Array[CardData] = []
var save_coin = [0,0,0,0,0,0]

func totalGems():
	return gems[0] + gems[1] + gems[2] + gems[3] + gems[4] + gems[5] 
	
func reset():
	gems = {
		Globals.COIN_COLOR.WHITE:0,
		Globals.COIN_COLOR.BLUE:0,
		Globals.COIN_COLOR.RED:0,
		Globals.COIN_COLOR.GREEN:0,
		Globals.COIN_COLOR.BROWN:0,
		Globals.COIN_COLOR.GOLD:0,
	} 
	bonuses = {
		Globals.COIN_COLOR.WHITE:0,
		Globals.COIN_COLOR.BLUE:0,
		Globals.COIN_COLOR.RED:0,
		Globals.COIN_COLOR.GREEN:0,
		Globals.COIN_COLOR.BROWN:0,
	}
	save_coin = [0,0,0,0,0,0]
	nobles = []
	prestige_points = 0
	reserved_cards = []
